import openpyxl

def readExcel(filename, sheetname=None, data_only=True):
    wb = openpyxl.load_workbook(filename, data_only=data_only)
    if sheetname is None:
        sheetname = wb.sheetnames[0]
    ws = wb[sheetname]
    data = []
    col_name = [cell.value for cell in ws[1]]
    for row in ws.iter_rows(min_row=2, values_only=True): # values_only=True to get only values
        data.append(dict(zip(col_name, row)))
    return data


if __name__ == '__main__':
    from pprint import pprint
    filename = "./test/api_doc.xlsx"
    data = readExcel(filename, 'main_test')
    pprint(data)